package com.example.launchmodedemo

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.util.Log
import kotlinx.android.synthetic.main.activity_a.*

class AActivity : AppCompatActivity() {
    var tag = AActivity::class.java.name
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        Log.v(tag, "onCreate")
        setContentView(R.layout.activity_a)
        button1.setOnClickListener { startActivity(Intent(this, BActivity::class.java)) }
    }

    override fun onNewIntent(intent: Intent?) {
        super.onNewIntent(intent)
        Log.v(tag, "onNewIntent")
    }

    override fun onRestart() {
        super.onRestart()
        Log.v(tag, "onRestart")
    }

    override fun onStart() {
        super.onStart()
        Log.v(tag, "onStart")
    }

    override fun onPause() {
        super.onPause()
        Log.v(tag, "onPause")
    }

    override fun onResume() {
        super.onResume()
        Log.v(tag, "onResume")
    }

    override fun onStop() {
        super.onStop()
        Log.v(tag, "onStop")
    }

    override fun onDestroy() {
        super.onDestroy()
        Log.v(tag, "onDestroy")
    }
}